﻿using System;
using System.ComponentModel.DataAnnotations;
using WebMvc.Models;

namespace WebMvc.Areas.Sys.Models
{
    /// <summary>
    /// 对象名称：用户管理数据实体类（数据实体层）
    /// 对象说明：该类作为数据载体，供业务逻辑层、数据访问层调用。
    /// 作者姓名：yb    
    /// </summary>
    public class User : BaseT
    {
        //[Key]
        //[Display(Name = "序号")]
        //public int Id { get; set; }

        [Required(ErrorMessage = "登录ID不能为空。")]
        [Display(Name = "登录ID")]
        public string LoginId { get; set; }

        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "密码不能为空。")]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Display(Name = "角色Id")]
        public int RoleId { get; set; }        

        [Display(Name = "锁定")]
        public bool IsLock { get; set; }
        
        [Display(Name = "最后登录时间")]
        public DateTime? LastLoginTime { get; set; }

        [Display(Name = "最后登录IP")]
        public string LastLoginIp { get; set; }

        [Display(Name = "邮箱地址")]
        public string EMail { get; set; }

        [Display(Name = "手机号")]
        public string MobileNumber { get; set; }
        
        [Display(Name = "登录次数")]
        public int LoginTimes { get; set; }

        [Display(Name = "部门ID")]
        public int DepartmentId { get; set; }

    }
}
